#!python
# -*- coding:utf-8 -*-

"""mysite URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url

from . import views

urlpatterns = [
	url(r'^test/', views.test),

	url(r'^index/', views.IndexView.as_view(), name="index"),
    url(r'^login/$', views.smErpLogin, name="login"),
    url(r'^logout/$', views.smErpLogout, name="logout"),
    url(r'^register/$', views.smErpRegister, name="register"),
    url(r'^captcha/$', views.smErpCaptcha, name="captcha"),                  # 验证码
    url(r'^active/$', views.smErpActive, name="active"),
    url(r'^complete/company/$', views.smErpCompleteCompany, name="complete_company"),     # 完善企业资料

    # 重新填写注册信息
    # url(r'^register/rewrite/$', )
    # 重发激活邮件
    url(r'^register/resendmail/$', views.smErpResendMail, name="resend_mail"),
    # 管理中心
    url(r'^manage/$', views.smErpManageView, name="manage"),
    url(r'^manage/suma_manage/$', views.smErpManageSumaManageView, name="suma_manage"),    # 溯码管理

    url(r'manage/brand/$', views.smErpManageBrand, name="manage_brand"),                    # 获取品牌列表信息
    url(r'manage/product/$', views.smErpManageProduct, name="manage_product"),              # 获取产品列表
    url(r'manage/material/$', views.smErpManageMaterial, name="manage_material"),           # 获取原料列表


    # url(r'^manage/test/$', views.smErpManageView),
    url(r'^create/brand/$', views.smErpCreateBrand, name="create_brand"),
    url(r'^create/product/$', views.smErpCreateProduct, name="create_product"),
    url(r'^create/material/$', views.smErpCreateMaterial, name="create_material"),

    url(r'^brand/info/(?P<brandid>[0-9]+)/$', views.smErpBrandInfo, name="brand_info"),
    url(r'^brand/info/(?P<brandid>[0-9]+)/change/$', views.smErpBrandInfoChange, name="brand_change"),

    url(r'^product/info/(?P<product_id>[0-9]+)/$', views.smErpProductInfo, name="product_info"),
    url(r'^product/info/(?P<product_id>[0-9]+)/change/$', views.smErpProductInfoChange, name="product_change"),

    url(r'^brand/license/(?P<brandid>[0-9]+)/$', views.smErpBrandLicense, name="brand_license"),
    url(r'^product/license/(?P<productid>[0-9]+)/$', views.smErpProductLicense, name="product_license"),
    url(r'^material/change/$', views.smErpMaterialChange, name="material_change"),

    url(r'^suma/order/$', views.smErpSumaOrder, name="suma_order"),
    url(r'^suma/order/list/$', views.smErpSumaOrderList, name="suma_order_list"),

    url(r'^suma/publish/$', views.smErpSumaPublish, name="suma_publish"),
    url(r'^suma/publish/list/$', views.smErpSumaPublishList, name="suma_publish_list"),

    url(r'^suma/product/list/$', views.smErpSumaProductList, name="suma_product_list"),

    # url(r'^brand/license/(?P<brandid>[0-9]+)/(?P<licenseid>[0-9]+)/$',)
	url(r'^resource/$', views.resource, name="resource"),
	# url(r'^manage/', views.manage),

	# 数据中心
	url(r'^statistics/$', views.statistics, name="statistics"),
    url(r'^suma/scan_code/list/$', views.smErpSumaScanCodeList, name="suma_scan_code"),
    url(r'^suma/scan_code/abnormal/list/$', views.smErpSumaScanAbnormalList, name="suma_scan_abnormal"),
    url(r'^suma/scan_code/feedback/$', views.smErpSumaScanFeedback, name="suma_scan_feedback"),

	url(r'^account/$', views.account, name="account"),
    url(r'^change/pwd/$', views.ChangePassword, name="change_password"),

    url(r'^image/upload$', views.ImageUpload, name="image_upload"),            # 图片上传
    url(r'^file/upload$', views.FileUpload, name="file_upload"),                # 文件上传
    url(r"^test/$", views.test, name="test"),
    url(r"^test1/$", views.test1, name="test1"),

    url(r"^create/suma/$", views.CreateSumaView, name="create_suma"),
    url(r"^suma/down/file/$", views.SmErpSmcodeFileDown, name="smcode_file_down"),

    # 用户协议
    url(r"^user/protocol/$", views.SmErpUserProtocol, name="user_protocol"),
    # 忘记密码
    url(r"^forget/password/$", views.SmErpForgetPassword, name="forget_password"),
    # 重置密码
    url(r"reset/password/$", views.SmErpResetPassword, name="reset_password"),
    # url(r"repassword/$", views.SmErpResetPassword, name="reset_password"),
]
